<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
	<div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
	<div class="form-group">
        <label for="c-category" class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
        <div class="col-xs-12 col-sm-8">
           <input id="c-category" class="form-control" name="row[category]" type="text" value="{$row.category|htmlentities}">
        </div>
    </div>
	<div class="form-group">
        <label for="c-gps" class="control-label col-xs-12 col-sm-2">{:__('Rules')}:</label>
        <div class="col-xs-12 col-sm-10">
                            <dl class="fieldlist" data-template="rulestpl" data-name="row[rules]">
                                <dd>
                                    <ins>{:__('题目标题')}</ins>
									<ins>{:__('选项A')}</ins>
									<ins>{:__('选项B')}</ins>
									<ins>{:__('选项C')}</ins>
									<ins>{:__('选项D')}</ins>
                                </dd>
                                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                                <textarea name="row[rules]" class="form-control" cols="30" rows="5" style="display:none">{$row.rules}</textarea>
                            </dl>
                            <script id="rulestpl" type="text/html">
                                <dd class="form-inline">
                                    <ins><input type="text" name="<%=name%>[<%=index%>][title]" class="form-control" value="<%=row.title%>" placeholder="题目标题"/></ins>
									<ins><input type="text" name="<%=name%>[<%=index%>][chosea]" class="form-control" value="<%=row.chosea%>" placeholder="选项A"/></ins>
									<ins><input type="text" name="<%=name%>[<%=index%>][choseb]" class="form-control" value="<%=row.choseb%>" placeholder="选项B"/></ins>
									<ins><input type="text" name="<%=name%>[<%=index%>][chosec]" class="form-control" value="<%=row.chosec%>" placeholder="选项C"/></ins>
									<ins><input type="text" name="<%=name%>[<%=index%>][chosed]" class="form-control" value="<%=row.chosed%>" placeholder="选项D"/></ins>
                                    <!--下面的两个按钮务必保留-->
                                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                </dd>
                            </script>
                        </div>
    </div>
	<div class="form-group">
        <label for="c-typename" class="control-label col-xs-12 col-sm-2">{:__('Typename')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[typename]', ['1'=>__('Isneed'), '0'=>__('Noneed')], $row['typename'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    var nodeData = {:json_encode($nodeList); };
</script>
